Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for a 0 alpha value in a swatch #261

Merged
merged 1 commit into from
Oct 1, 2018

Conversation

malissa
Copy link
Contributor

@malissa malissa commented Sep 27, 2018

Bug: When creating a swatch, if the rgba alpha value is 0, the span.minicolors-swatch-color element is styled with a background color that leaves off the alpha.

Solution: In the parseRgb function, check for the presence of rgba[3] using undefined, otherwise 0 will trigger false.

@claviska claviska merged commit 2b86995 into claviska:master Oct 1, 2018
@claviska
Copy link
Owner

claviska commented Oct 1, 2018

Thanks for fixing this, and also for the code quality repairs! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants